package klok;

import java.util.Observable;

public class Timer extends Observable {

	public static void main(String[] args) {
		KlokFrame kf = new KlokFrame();
		kf.createFrame();
		Timer timer = new Timer();
		timer.addObserver(kf);
		timer.go();
	}

	public void go() {
		while (true) {
			try {
				Thread.sleep(1000);
				setChanged();
				notifyObservers("tick");
				clearChanged();
			} catch (InterruptedException e) {
				System.out.println(e.getStackTrace());
			}
		}
	}

}
